MsgBox "There are still open files on the service and it cannot be disconnected. Please close the open files and click 'OK' to dismount the service.", 0, "Network Services"
GoTo DismAttempt
End If
If nOpenFileAction = NET_OPENQUERY Then ' Warn and prompt
nAction = MsgBox("There are still open files on the service. Do you want to disconnect anyway?", 4 + 32, "Network Services")
Function UT_NetError (nErrorCode As Integer) As String
' Copyright ⌐ 1993, 1994 by Computer Technologies, Inc. All rights reserved.
' This function is passed the network error from a WNet* API function.
' The return string is the text form of the error.
Dim tMessageText As String
Select Case nErrorCode
Case WN_NOT_SUPPORTED: tMessageText = "Function is not supported."
Case WN_OUT_OF_MEMORY: tMessageText = "Out of memory."
Case WN_NET_ERROR: tMessageText = "An error occurred on the network."
Case WN_BAD_POINTER: tMessageText = "The pointer was invalid."
Case WN_BAD_NETNAME: tMessageText = "Invalid network resource name."
Case WN_BAD_PASSWORD: tMessageText = "The password was invalid. Please try again."
Case WN_BAD_VALUE: tMessageText = "Invalid local device name."
Case WN_BAD_LOCALNAME: tMessageText = "The local device name was invalid."
Case WN_ACCESS_DENIED: tMessageText = "The maximum number of users are already connected to this service, or a security has violation occurred. Please try again later."
Case WN_ALREADY_CONNECTED: tMessageText = "The local device is already connected to a resource."
Case WN_NOT_CONNECTED: tMessageText = "The device is not a redirected network resource."
Case WN_MORE_DATA: tMessageText = "More data."
Case WN_FUNCTION_BUSY: tMessageText = "Function is already busy."
Case WN_WINDOWS_ERROR: tMessageText = "Unexpected Windows error."
Case WN_BAD_USER: tMessageText = "The user name is invalid. Please try again."
Case WN_OUT_OF_MEMORY: tMessageText = "Out of memory."
Case WN_OPEN_FILES: tMessageText = "There are open files on the service."
Case WN_DEVICE_ERROR: tMessageText = "A device error occurred."
Case WN_CONNECTION_CLOSED: tMessageText = "Connection is closed."